package com.beauty.order.client;

import com.beauty.order.result.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.Map;

/**
 * 物流服务Feign客户端
 */
@FeignClient(name = "beauty-logistics", path = "/api/shipment")
public interface LogisticsClient {
    
    /**
     * 创建物流信息
     * @param shipmentRequest 物流创建请求
     * @return 响应
     */
    @PostMapping
    Result<?> createShipment(@RequestBody Map<String, Object> shipmentRequest);
    
    /**
     * 获取订单相关的物流信息
     * @param orderId 订单ID
     * @return 响应
     */
    @GetMapping("/order/{orderId}")
    Result<?> getShipmentsByOrderId(@PathVariable("orderId") String orderId);
    
    /**
     * 获取可用的物流承运商
     * @return 响应
     */
    @GetMapping("/carriers")
    Result<?> getAvailableCarriers();
} 